var httpsUrl = getApp().globalData.httpsUrl;
var globalData = getApp().globalData;
var commonUtil = require("../../../utils/commonUtil.js")
Page({
  data: {
    imgUrl: globalData.imgUrl,
    pageNo: 1,
    pageSize: 50,
    list: [],
  },
  onLoad: function (options) {
    let that = this;
    let params = new Object();
    params.pageNo = this.data.pageNo;
    params.pageSize = this.data.pageSize;
    commonUtil.showLoading("请稍等...");
    let openId = wx.getStorageSync("openidKey");
    let sid = wx.getStorageSync("JSESSIONID");
    console.log("header:openId:" + openId + ",sid:" + sid);
    wx.request({
      header: { "openId": openId, "sid": sid, "content-Type": "application/x-www-form-urlencoded" },
      url: httpsUrl + "/businessManage/cardRecord",
      dataType: "json",
      method: "POST",
      data: params,
      success: function (res) {
        commonUtil.hideLoading();
        var res = res.data;
        console.log(JSON.stringify(res));
        if (res.result == 0) {
          that.setData({ list: res.data.list })
        }
      }
    })
  },
})